\(\int \sqrt {a+b \tan (c+d x)} \, dx\) [507]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F(-2)]
   Giac [F(-2)]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 358 \[ \int \sqrt {a+b \tan (c+d x)} \, dx=\frac {b \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}-\frac {b \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}+\frac {b \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d} \]

[Out]

1/2*b*arctanh(((a+(a^2+b^2)^(1/2))^(1/2)-2^(1/2)*(a+b*tan(d*x+c))^(1/2))/(a-(a^2+b^2)^(1/2))^(1/2))/d*2^(1/2)/
(a-(a^2+b^2)^(1/2))^(1/2)-1/2*b*arctanh(((a+(a^2+b^2)^(1/2))^(1/2)+2^(1/2)*(a+b*tan(d*x+c))^(1/2))/(a-(a^2+b^2
)^(1/2))^(1/2))/d*2^(1/2)/(a-(a^2+b^2)^(1/2))^(1/2)+1/4*b*ln(a+(a^2+b^2)^(1/2)-2^(1/2)*(a+(a^2+b^2)^(1/2))^(1/
2)*(a+b*tan(d*x+c))^(1/2)+b*tan(d*x+c))/d*2^(1/2)/(a+(a^2+b^2)^(1/2))^(1/2)-1/4*b*ln(a+(a^2+b^2)^(1/2)+2^(1/2)
*(a+(a^2+b^2)^(1/2))^(1/2)*(a+b*tan(d*x+c))^(1/2)+b*tan(d*x+c))/d*2^(1/2)/(a+(a^2+b^2)^(1/2))^(1/2)

Rubi [A] (verified)

Time = 0.36 (sec) , antiderivative size = 358, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3566, 714, 1143, 648, 632, 212, 642} \[ \int \sqrt {a+b \tan (c+d x)} \, dx=\frac {b \text {arctanh}\left (\frac {\sqrt {\sqrt {a^2+b^2}+a}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} d \sqrt {a-\sqrt {a^2+b^2}}}-\frac {b \text {arctanh}\left (\frac {\sqrt {\sqrt {a^2+b^2}+a}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} d \sqrt {a-\sqrt {a^2+b^2}}}+\frac {b \log \left (-\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \sqrt {a+b \tan (c+d x)}+\sqrt {a^2+b^2}+a+b \tan (c+d x)\right )}{2 \sqrt {2} d \sqrt {\sqrt {a^2+b^2}+a}}-\frac {b \log \left (\sqrt {2} \sqrt {\sqrt {a^2+b^2}+a} \sqrt {a+b \tan (c+d x)}+\sqrt {a^2+b^2}+a+b \tan (c+d x)\right )}{2 \sqrt {2} d \sqrt {\sqrt {a^2+b^2}+a}} \]

[In]

Int[Sqrt[a + b*Tan[c + d*x]],x]

[Out]

(b*ArcTanh[(Sqrt[a + Sqrt[a^2 + b^2]] - Sqrt[2]*Sqrt[a + b*Tan[c + d*x]])/Sqrt[a - Sqrt[a^2 + b^2]]])/(Sqrt[2]
*Sqrt[a - Sqrt[a^2 + b^2]]*d) - (b*ArcTanh[(Sqrt[a + Sqrt[a^2 + b^2]] + Sqrt[2]*Sqrt[a + b*Tan[c + d*x]])/Sqrt
[a - Sqrt[a^2 + b^2]]])/(Sqrt[2]*Sqrt[a - Sqrt[a^2 + b^2]]*d) + (b*Log[a + Sqrt[a^2 + b^2] + b*Tan[c + d*x] -
Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*Sqrt[a + b*Tan[c + d*x]]])/(2*Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*d) - (b*Log[
a + Sqrt[a^2 + b^2] + b*Tan[c + d*x] + Sqrt[2]*Sqrt[a + Sqrt[a^2 + b^2]]*Sqrt[a + b*Tan[c + d*x]]])/(2*Sqrt[2]
*Sqrt[a + Sqrt[a^2 + b^2]]*d)

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 714

Int[Sqrt[(d_) + (e_.)*(x_)]/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[2*e, Subst[Int[x^2/(c*d^2 + a*e^2 - 2*c*d
*x^2 + c*x^4), x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0]

Rule 1143

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r = Rt[2*q - b/
c, 2]}, Dist[1/(2*c*r), Int[x^(m - 1)/(q - r*x + x^2), x], x] - Dist[1/(2*c*r), Int[x^(m - 1)/(q + r*x + x^2),
 x], x]]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && GeQ[m, 1] && LtQ[m, 3] && NegQ[b^2 - 4*a*c]

Rule 3566

Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[b/d, Subst[Int[(a + x)^n/(b^2 + x^2), x], x
, b*Tan[c + d*x]], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[a^2 + b^2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {b \text {Subst}\left (\int \frac {\sqrt {a+x}}{b^2+x^2} \, dx,x,b \tan (c+d x)\right )}{d} \\ & = \frac {(2 b) \text {Subst}\left (\int \frac {x^2}{a^2+b^2-2 a x^2+x^4} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{d} \\ & = \frac {b \text {Subst}\left (\int \frac {x}{\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b \text {Subst}\left (\int \frac {x}{\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d} \\ & = \frac {b \text {Subst}\left (\int \frac {1}{\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{2 d}+\frac {b \text {Subst}\left (\int \frac {1}{\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{2 d}+\frac {b \text {Subst}\left (\int \frac {-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 x}{\sqrt {a^2+b^2}-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b \text {Subst}\left (\int \frac {\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 x}{\sqrt {a^2+b^2}+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} x+x^2} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d} \\ & = \frac {b \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b \text {Subst}\left (\int \frac {1}{2 \left (a-\sqrt {a^2+b^2}\right )-x^2} \, dx,x,-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 \sqrt {a+b \tan (c+d x)}\right )}{d}-\frac {b \text {Subst}\left (\int \frac {1}{2 \left (a-\sqrt {a^2+b^2}\right )-x^2} \, dx,x,\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}}+2 \sqrt {a+b \tan (c+d x)}\right )}{d} \\ & = \frac {b \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}-\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}-\frac {b \text {arctanh}\left (\frac {\sqrt {a+\sqrt {a^2+b^2}}+\sqrt {2} \sqrt {a+b \tan (c+d x)}}{\sqrt {a-\sqrt {a^2+b^2}}}\right )}{\sqrt {2} \sqrt {a-\sqrt {a^2+b^2}} d}+\frac {b \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)-\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d}-\frac {b \log \left (a+\sqrt {a^2+b^2}+b \tan (c+d x)+\sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} \sqrt {a+b \tan (c+d x)}\right )}{2 \sqrt {2} \sqrt {a+\sqrt {a^2+b^2}} d} \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.04 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.24 \[ \int \sqrt {a+b \tan (c+d x)} \, dx=-\frac {i \left (\sqrt {a-i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )-\sqrt {a+i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )\right )}{d} \]

[In]

Integrate[Sqrt[a + b*Tan[c + d*x]],x]

[Out]

((-I)*(Sqrt[a - I*b]*ArcTanh[Sqrt[a + b*Tan[c + d*x]]/Sqrt[a - I*b]] - Sqrt[a + I*b]*ArcTanh[Sqrt[a + b*Tan[c
+ d*x]]/Sqrt[a + I*b]]))/d

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(649\) vs. \(2(287)=574\).

Time = 3.64 (sec) , antiderivative size = 650, normalized size of antiderivative = 1.82

method result size
derivativedivides \(-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}+\frac {\left (a^{2}+b^{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}-\frac {a^{2} \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \ln \left (b \tan \left (d x +c \right )+a -\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}+\frac {\left (a^{2}+b^{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \ln \left (b \tan \left (d x +c \right )+a -\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}-\frac {a^{2} \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\) \(650\)
default \(-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}+\frac {\left (a^{2}+b^{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \ln \left (b \tan \left (d x +c \right )+a +\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}-\frac {a^{2} \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}+\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}+\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, \sqrt {a^{2}+b^{2}}\, \ln \left (b \tan \left (d x +c \right )+a -\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}+\frac {\left (a^{2}+b^{2}\right ) \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}-\frac {\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}\, a \ln \left (b \tan \left (d x +c \right )+a -\sqrt {a +b \tan \left (d x +c \right )}\, \sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}+\sqrt {a^{2}+b^{2}}\right )}{4 d b}-\frac {a^{2} \arctan \left (\frac {2 \sqrt {a +b \tan \left (d x +c \right )}-\sqrt {2 \sqrt {a^{2}+b^{2}}+2 a}}{\sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\right )}{d b \sqrt {2 \sqrt {a^{2}+b^{2}}-2 a}}\) \(650\)

[In]

int((a+b*tan(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/4/d/b*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*ln(b*tan(d*x+c)+a+(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(
1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))+1/d/b*(a^2+b^2)/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*tan(d*x+c))^(1/2
)+(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))+1/4/d/b*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a*ln(b*t
an(d*x+c)+a+(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))-1/d/b*a^2/(2*(a^2+b^2)^(1/2)
-2*a)^(1/2)*arctan((2*(a+b*tan(d*x+c))^(1/2)+(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))+1/4
/d/b*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a^2+b^2)^(1/2)*ln(b*tan(d*x+c)+a-(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)
+2*a)^(1/2)+(a^2+b^2)^(1/2))+1/d/b*(a^2+b^2)/(2*(a^2+b^2)^(1/2)-2*a)^(1/2)*arctan((2*(a+b*tan(d*x+c))^(1/2)-(2
*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))-1/4/d/b*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a*ln(b*tan(d
*x+c)+a-(a+b*tan(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))-1/d/b*a^2/(2*(a^2+b^2)^(1/2)-2*a
)^(1/2)*arctan((2*(a+b*tan(d*x+c))^(1/2)-(2*(a^2+b^2)^(1/2)+2*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 319, normalized size of antiderivative = 0.89 \[ \int \sqrt {a+b \tan (c+d x)} \, dx=-\frac {1}{2} \, \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \log \left (d^{3} \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \sqrt {-\frac {b^{2}}{d^{4}}} + \sqrt {b \tan \left (d x + c\right ) + a} b\right ) + \frac {1}{2} \, \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \log \left (-d^{3} \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \sqrt {-\frac {b^{2}}{d^{4}}} + \sqrt {b \tan \left (d x + c\right ) + a} b\right ) + \frac {1}{2} \, \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \log \left (d^{3} \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \sqrt {-\frac {b^{2}}{d^{4}}} + \sqrt {b \tan \left (d x + c\right ) + a} b\right ) - \frac {1}{2} \, \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \log \left (-d^{3} \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \sqrt {-\frac {b^{2}}{d^{4}}} + \sqrt {b \tan \left (d x + c\right ) + a} b\right ) \]

[In]

integrate((a+b*tan(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

-1/2*sqrt(-(d^2*sqrt(-b^2/d^4) + a)/d^2)*log(d^3*sqrt(-(d^2*sqrt(-b^2/d^4) + a)/d^2)*sqrt(-b^2/d^4) + sqrt(b*t
an(d*x + c) + a)*b) + 1/2*sqrt(-(d^2*sqrt(-b^2/d^4) + a)/d^2)*log(-d^3*sqrt(-(d^2*sqrt(-b^2/d^4) + a)/d^2)*sqr
t(-b^2/d^4) + sqrt(b*tan(d*x + c) + a)*b) + 1/2*sqrt((d^2*sqrt(-b^2/d^4) - a)/d^2)*log(d^3*sqrt((d^2*sqrt(-b^2
/d^4) - a)/d^2)*sqrt(-b^2/d^4) + sqrt(b*tan(d*x + c) + a)*b) - 1/2*sqrt((d^2*sqrt(-b^2/d^4) - a)/d^2)*log(-d^3
*sqrt((d^2*sqrt(-b^2/d^4) - a)/d^2)*sqrt(-b^2/d^4) + sqrt(b*tan(d*x + c) + a)*b)

Sympy [F]

\[ \int \sqrt {a+b \tan (c+d x)} \, dx=\int \sqrt {a + b \tan {\left (c + d x \right )}}\, dx \]

[In]

integrate((a+b*tan(d*x+c))**(1/2),x)

[Out]

Integral(sqrt(a + b*tan(c + d*x)), x)

Maxima [F(-2)]

Exception generated. \[ \int \sqrt {a+b \tan (c+d x)} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((a+b*tan(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for mor
e details)Is

Giac [F(-2)]

Exception generated. \[ \int \sqrt {a+b \tan (c+d x)} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate((a+b*tan(d*x+c))^(1/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:sym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Valuesym2poly/r2sym(c
onst gen &

Mupad [B] (verification not implemented)

Time = 5.07 (sec) , antiderivative size = 213, normalized size of antiderivative = 0.59 \[ \int \sqrt {a+b \tan (c+d x)} \, dx=-\mathrm {atanh}\left (\frac {d^3\,\sqrt {-\frac {a-b\,1{}\mathrm {i}}{d^2}}\,\left (\frac {16\,\left (b^4-a^2\,b^2\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{d^2}+\frac {16\,a\,b^2\,\left (a-b\,1{}\mathrm {i}\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{d^2}\right )}{16\,\left (a^2\,b^3+b^5\right )}\right )\,\sqrt {-\frac {a-b\,1{}\mathrm {i}}{d^2}}-\mathrm {atanh}\left (\frac {d^3\,\sqrt {-\frac {a+b\,1{}\mathrm {i}}{d^2}}\,\left (\frac {16\,\left (b^4-a^2\,b^2\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{d^2}+\frac {16\,a\,b^2\,\left (a+b\,1{}\mathrm {i}\right )\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{d^2}\right )}{16\,\left (a^2\,b^3+b^5\right )}\right )\,\sqrt {-\frac {a+b\,1{}\mathrm {i}}{d^2}} \]

[In]

int((a + b*tan(c + d*x))^(1/2),x)

[Out]

- atanh((d^3*(-(a - b*1i)/d^2)^(1/2)*((16*(b^4 - a^2*b^2)*(a + b*tan(c + d*x))^(1/2))/d^2 + (16*a*b^2*(a - b*1
i)*(a + b*tan(c + d*x))^(1/2))/d^2))/(16*(b^5 + a^2*b^3)))*(-(a - b*1i)/d^2)^(1/2) - atanh((d^3*(-(a + b*1i)/d
^2)^(1/2)*((16*(b^4 - a^2*b^2)*(a + b*tan(c + d*x))^(1/2))/d^2 + (16*a*b^2*(a + b*1i)*(a + b*tan(c + d*x))^(1/
2))/d^2))/(16*(b^5 + a^2*b^3)))*(-(a + b*1i)/d^2)^(1/2)